.class Lcom/estrongs/android/ui/animation/a;
.super Landroidx/recyclerview/widget/LinearSmoothScroller;
.source "MyLinearLayoutManager.java"


# static fields
.field private static final c:Ljava/lang/String; = "a"


# instance fields
.field private a:Landroidx/recyclerview/widget/LinearLayoutManager;

.field private b:F


# direct methods
.method static constructor <clinit>()V
    .locals 0

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroidx/recyclerview/widget/LinearLayoutManager;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Landroidx/recyclerview/widget/LinearSmoothScroller;-><init>(Landroid/content/Context;)V

    const/4 p1, 0x0

    .line 2
    iput p1, p0, Lcom/estrongs/android/ui/animation/a;->b:F

    .line 3
    iput-object p2, p0, Lcom/estrongs/android/ui/animation/a;->a:Landroidx/recyclerview/widget/LinearLayoutManager;

    return-void
.end method


# virtual methods
.method public a()F
    .locals 1

    .line 2
    iget v0, p0, Lcom/estrongs/android/ui/animation/a;->b:F

    return v0
.end method

.method public a(F)V
    .locals 0

    .line 1
    iput p1, p0, Lcom/estrongs/android/ui/animation/a;->b:F

    return-void
.end method

.method protected calculateTimeForDeceleration(I)I
    .locals 4

    .line 1
    invoke-virtual {p0, p1}, Lcom/estrongs/android/ui/animation/a;->calculateTimeForScrolling(I)I

    move-result p1

    .line 2
    iget v0, p0, Lcom/estrongs/android/ui/animation/a;->b:F

    const/4 v1, 0x0

    cmpl-float v0, v1, v0

    if-nez v0, :cond_0

    int-to-double v0, p1

    const-wide v2, 0x3fd57a786c22680aL    # 0.3356

    .line 3
    invoke-static {v0, v1}, Ljava/lang/Double;->isNaN(D)Z

    div-double/2addr v0, v2

    invoke-static {v0, v1}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v0

    double-to-int p1, v0

    :cond_0
    return p1
.end method

.method protected calculateTimeForScrolling(I)I
    .locals 2

    .line 1
    iget v0, p0, Lcom/estrongs/android/ui/animation/a;->b:F

    const/4 v1, 0x0

    cmpl-float v0, v1, v0

    if-nez v0, :cond_0

    .line 2
    invoke-super {p0, p1}, Landroidx/recyclerview/widget/LinearSmoothScroller;->calculateTimeForScrolling(I)I

    move-result p1

    return p1

    .line 3
    :cond_0
    invoke-static {p1}, Ljava/lang/Math;->abs(I)I

    move-result p1

    int-to-float p1, p1

    iget v0, p0, Lcom/estrongs/android/ui/animation/a;->b:F

    div-float/2addr p1, v0

    float-to-double v0, p1

    invoke-static {v0, v1}, Ljava/lang/Math;->ceil(D)D

    move-result-wide v0

    double-to-int p1, v0

    return p1
.end method

.method public computeScrollVectorForPosition(I)Landroid/graphics/PointF;
    .locals 4

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/ui/animation/a;->a:Landroidx/recyclerview/widget/LinearLayoutManager;

    invoke-virtual {v0}, Landroidx/recyclerview/widget/LinearLayoutManager;->findFirstVisibleItemPosition()I

    move-result v0

    const/4 v1, 0x0

    const/4 v2, -0x1

    if-ne v2, v0, :cond_0

    .line 2
    sget-object v0, Lcom/estrongs/android/ui/animation/a;->c:Ljava/lang/String;

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "computeScrollVectorForPosition("

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string p1, ") no child"

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {v0, p1}, Lcom/estrongs/android/util/n;->e(Ljava/lang/String;Ljava/lang/String;)V

    .line 3
    new-instance p1, Landroid/graphics/PointF;

    invoke-direct {p1, v1, v1}, Landroid/graphics/PointF;-><init>(FF)V

    return-object p1

    .line 4
    :cond_0
    iget-object v2, p0, Lcom/estrongs/android/ui/animation/a;->a:Landroidx/recyclerview/widget/LinearLayoutManager;

    invoke-virtual {v2, v0}, Landroidx/recyclerview/widget/LinearLayoutManager;->findViewByPosition(I)Landroid/view/View;

    move-result-object v2

    .line 5
    iget-object v3, p0, Lcom/estrongs/android/ui/animation/a;->a:Landroidx/recyclerview/widget/LinearLayoutManager;

    invoke-virtual {v3, v2}, Landroidx/recyclerview/widget/RecyclerView$LayoutManager;->getDecoratedMeasuredHeight(Landroid/view/View;)I

    move-result v2

    .line 6
    new-instance v3, Landroid/graphics/PointF;

    sub-int/2addr p1, v0

    mul-int v2, v2, p1

    int-to-float p1, v2

    invoke-direct {v3, v1, p1}, Landroid/graphics/PointF;-><init>(FF)V

    return-object v3
.end method

.method protected getVerticalSnapPreference()I
    .locals 1

    const/4 v0, -0x1

    return v0
.end method
